package com.ny.controller;

import com.ny.service.ClassroomService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
public class ClassRoomController {
@Autowired
    private ClassroomService classroomService;
@RequestMapping("classroomList")
    private String classroomList (Model model){
    model.addAttribute("classroomList",classroomService.findAllClassrooms());
    return "classroom";

   }
}
